/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-13
 */
class Dog{
    public String name;
    public String color;
    public Dog() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Dog(String name, String color) {
        this.name = name;
        this.color = color;
    }

    public void barks(){
        System.out.println(name + " wang!");
    }
}

class Date{
    public int year;
    public int month;
    public int day;

    public void setDate(int year, int month, int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public void printDate(){
        System.out.println(year + "-" + month + "-" + day);
    }
}

class Student{
    public String name;
    public int age;

    public void setStudent(String name, int age){
        this.name = name;
        this.age = age;
    }
    public void printStudent(){
        System.out.println(this.name + ":" + this.age);
    }
    public void printStudent(String name, int age){
        this.setStudent(name, age);
        System.out.println(this.name + ":" + this.age);
    }
}
public class Main {
    public static void main1(String[] args) {
        Dog test = new Dog();
        test.name = "zhangsan";
        test.barks();
    }

    public static void main2(String[] args) {
        Date date = new Date();
        date.setDate(2024,7,13);
        date.printDate();
    }

    public static void main(String[] args) {
        Student stu = new Student();
        stu.printStudent("张三", 18);
    }
}
